home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / zendisk1.zip / LST10-7.ASM < prev    next >
Assembly Source File  |  1990-02-15  |  465b  |  24 lines

  1. ;
  2. ; *** Listing 10-7 ***
  3. ;
  4. ; Initializes a 1000-word array using a loop and
  5. ; non-string instructions.
  6. ;
  7.     jmp    Skip
  8. ;
  9. ARRAY_LENGTH    equ    1000
  10. WordArray    dw    ARRAY_LENGTH dup (?)
  11. ;
  12. Skip:
  13.     call    ZTimerOn
  14.     mov    di,offset WordArray
  15.             ;point to array to fill
  16.     sub    ax,ax    ;we'll fill with the value zero
  17.     mov    cx,ARRAY_LENGTH ;# of words to fill
  18. ZeroLoop:
  19.     mov    [di],ax    ;zero one word
  20.     inc    di    ;point to the next word
  21.     inc    di
  22.     loop    ZeroLoop
  23.     call    ZTimerOff
  24.